<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>GM操作</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
    <div class="layui-form layuimini-form" id="app">
        <div class="layuimini-main">
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>角色详情信息</legend>
            </fieldset>
            <div class="layui-form layui-clear detail-form">
                <div class="left">
                    <div class="layui-form-item">
                        <label class="layui-form-label">区服: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                区ID: {{detail.member.areaid}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">账号: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.member.username}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">角色ID: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.id}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">角色名: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.nick}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">职业: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                <span v-if="detail.job==1">战士</span>
                                <span v-else-if="detail.job==2">法师</span>
                                <span v-else-if="detail.job==4">弓手</span>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">性别: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                <span v-if="detail.sex==1">男</span>
                                <span v-else>女</span>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">等级: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.level}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">当前经验值: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.curexp}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">元宝: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.money.vcoin}}
                            </div>
                        </div>
                    </div>

                </div>
                <div class="left">
                    <div class="layui-form-item">
                        <label class="layui-form-label">华夏币: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.money.gold}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">银元: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.money.silverCoin}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">善恶值: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.baseAtkAttr.crimeValue}}
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">力量: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.baseAtkAttr.strength}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">敏捷: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.baseAtkAttr.agility}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">体质: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.baseAtkAttr.constitution}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">智力: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.baseAtkAttr.intellect}}
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">剩余属性点: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.baseAtkAttr.attributePoint}}
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">剩余属性技能点: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.baseAtkAttr.skillPoint}}
                            </div>
                        </div>
                    </div>
                </div>
                <div class="left">
                    <div class="layui-form-item">
                        <label class="layui-form-label">创建时间: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{getYMDHMS(detail.createtime)}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">最后登录时间: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{getYMDHMS(detail.logintime)}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">氏族: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.clanData.clanId}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">氏族贡献: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.clanData.exitClanTick}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">PK模式: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                <span v-if="detail.settings.pkMode==0">练级</span>
                                <span v-if="detail.settings.pkMode==1">团队</span>
                                <span v-if="detail.settings.pkMode==2">氏族</span>
                                <span v-if="detail.settings.pkMode==3">善恶</span>
                                <span v-if="detail.settings.pkMode==4">PK</span>
                                <span v-if="detail.settings.pkMode==5">阵营</span>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">场景地图: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                ID: {{detail.mapid}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">坐标: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                {{detail.pos}}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">转生: </label>
                        <div class="layui-input-inline">
                            <div class="layui-form-mid">
                                <span v-if="detail.transData.transFlag==0">未转生</span>
                                <span v-else-if="detail.transData.transFlag<0">已转生</span>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="left" id="gm-box"  style="background: #F5FBF1;">
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                        <legend>属性修改</legend>
                    </fieldset>
                    <div style="margin: 10px 10px 10px 10px">
                        <form action="" id="gm-form" lay-filter="gm-form">
                            <div class="layui-form-item">
                                <label for="" class="layui-form-label">属性类型</label>
                                <div class="layui-input-inline">
                                    <select name="" class="layui-select">
                                        <option value="">请选择</option>
                                        <option value="a">当前经验值</option>
                                        <option value="b">当前等级</option>
                                        <option value="c">增减华夏币</option>
                                        <option value="d">增减银元</option>
                                        <option value="e">增减元宝</option>
                                        <option value="f">当前善恶值</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label for="" class="layui-form-label">设定数值</label>
                                <div class="layui-input-inline">
                                    <input type="number" step="1" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label for="" class="layui-form-label">角色名验证</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" placeholder="请输入角色名">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit="" lay-filter="submit">提交修改</button>
                                    <button type="button" class="layui-btn layui-btn-primary" v-on:click="showDetail()">刷新左侧</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<style>
    .detail-form .layui-form-label{
        width: 108px;
    }
</style>
<script src="/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script src="/js/common.js?v=5" charset="utf-8"></script>
<script>
Id = urlParam('gameArea');
layui.use(['form'],function(){
    var form =layui.form,$=layui.$;
    new Vue({
        el:"#app",
        data:{
            detail:{
                member:{},
                money:{},
                baseAtkAttr:{},
                settings:{},
                clanData:{},
                transData:{},
            },
        },
        methods:{
            showDetail:function () {
                var _this = this;
                var id = urlParam("id");
                $.get('/admin/gameRole/'+id + '?gameArea='+Id,{},function(res){
                    _this.detail = res.data;
                })
            }
        },
        updated:function(){
            form.render();
        },
        mounted:function () {
            var _this = this;
            _this.showDetail();
        }
    })
})
</script>
</html>